package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysDictRegionMapper;
import com.ruoyi.system.domain.SysDictRegion;
import com.ruoyi.system.service.ISysDictRegionService;

/**
 * 区划Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-10
 */
@Service
public class SysDictRegionServiceImpl implements ISysDictRegionService 
{
    @Autowired
    private SysDictRegionMapper sysDictRegionMapper;

    /**
     * 查询区划
     * 
     * @param code 区划主键
     * @return 区划
     */
    @Override
    public SysDictRegion selectSysDictRegionByCode(String code)
    {
        return sysDictRegionMapper.selectSysDictRegionByCode(code);
    }

    /**
     * 查询区划列表
     * 
     * @param sysDictRegion 区划
     * @return 区划
     */
    @Override
    public List<SysDictRegion> selectSysDictRegionList(SysDictRegion sysDictRegion)
    {
        return sysDictRegionMapper.selectSysDictRegionList(sysDictRegion);
    }

    /**
     * 新增区划
     * 
     * @param sysDictRegion 区划
     * @return 结果
     */
    @Override
    public int insertSysDictRegion(SysDictRegion sysDictRegion)
    {
        return sysDictRegionMapper.insertSysDictRegion(sysDictRegion);
    }

    /**
     * 修改区划
     * 
     * @param sysDictRegion 区划
     * @return 结果
     */
    @Override
    public int updateSysDictRegion(SysDictRegion sysDictRegion)
    {
        return sysDictRegionMapper.updateSysDictRegion(sysDictRegion);
    }

    /**
     * 批量删除区划
     * 
     * @param codes 需要删除的区划主键
     * @return 结果
     */
    @Override
    public int deleteSysDictRegionByCodes(String[] codes)
    {
        return sysDictRegionMapper.deleteSysDictRegionByCodes(codes);
    }

    /**
     * 删除区划信息
     * 
     * @param code 区划主键
     * @return 结果
     */
    @Override
    public int deleteSysDictRegionByCode(String code)
    {
        return sysDictRegionMapper.deleteSysDictRegionByCode(code);
    }
}
